package com.example.jinmingwu.a180524_intentbroacast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * Created by jinmingwu on 2018/5/28.
 * 接收broadcast：
 * 1.注册一个Broadcast Receiver；
 * 2.并且注册一个Intent Filter来定制BroadcaseReceiver是对哪些Intent进行监听；
 */

public class OtherActivity extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        //从Intent当中根据key取得value
        String value=intent.getStringExtra("testIntent");
        Log.e("IntertReceiver-->Test",value);
    }
}
